﻿using InfonavaEye.util;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Windows.Media;

namespace InfonavaEye
{
    internal static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            //调试模式的时候 打印到控制台上（非调试模式打印到日志文件中去）
            var debug = false;
            ConsoleLogTextWriter logSW = new ConsoleLogTextWriter();
            logSW.SetDebug(debug);
            if (!debug)
            {
                Console.SetOut(logSW);
            }

            Console.WriteLine("程序启动");

            //打印加密字符
            //加密
            //Console.WriteLine(DesEncrypt.Encrypt("https://api.textin.com/ai/service/v2/recognize_slices"));
            //Console.WriteLine(DesEncrypt.Encrypt("b888597910e7266edd516f042349d37c"));
            //解密
            //Console.WriteLine(DesEncrypt.Decrypt("GZmeGTAxE/vt7HcuTWaQBeNnRXIEdQKzc7urVTvHIVRDc5YUc+Yp1DKmON7XFxA39jNNpgz22Vw="));
            //Console.WriteLine(DesEncrypt.Decrypt("kGRZFJCCE5x07RJeem2oyAiGWaxg1VsacRDD/T6Bm2C8TpPCLfIQ4Q=="));

            LoadingForm loadingForm = new LoadingForm();
            loadingForm.ShowDialog();
            if (loadingForm.DialogResult == DialogResult.OK)
            {
                Application.Run(new IndexForm());
            }
            else
            {
                return;
            }

            //Application.Run(new IndexForm());
            //Application.Run(new BroswerForm());
            //Application.Run(new MainForm());
            //Application.Run(new ClientForm());
            //Application.Run(new ServerForm());
        }
    }
}
